package com.zlc.common.core.role.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zlc.common.common.service.BaseServiceImpl;
import com.zlc.common.core.role.mapper.MayanPlatRoleMapper;
import com.zlc.common.core.role.model.entity.MayanPlatRole;
import com.zlc.common.core.role.model.vo.MayanPlatRoleVo;
import com.zlc.common.core.role.service.MayanPlatRoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author  zl
 * @date 2023-05-08 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MayanPlatRoleServiceImpl extends BaseServiceImpl<MayanPlatRoleMapper, MayanPlatRole, MayanPlatRoleVo> implements MayanPlatRoleService {

    @Override
    public MayanPlatRoleVo getByRoleCode(String roleCode) {
        LambdaQueryWrapper<MayanPlatRole> wrapper = wrapper().eq(MayanPlatRole::getRoleCode, roleCode);
        return queryOne(wrapper);
    }
}
